package motivationalShoes;

import communications.BluetoothHandler;
import communications.EmailHandler;
import java.util.TimerTask;

/**
 * The SendBeenAWhileEmailTask class is a TimerTask,
 * sending a motivational e-mail when run.
 * It is used to schedule the sending of e-mails.
 *
 * @author Robin Persson
 */

public class SendBeenAWhileEmailTask extends TimerTask
{

	private EmailHandler emailhandler;
	private BluetoothHandler bluetoothHandler;

	public SendBeenAWhileEmailTask(EmailHandler emailhandler, BluetoothHandler bluetoothHandler) {
		this.emailhandler = emailhandler;
		this.bluetoothHandler = bluetoothHandler;
	}
	
	public void run() {
		emailhandler.sendBeenAWhileEmail();
		bluetoothHandler.beenAWhile();
	}

}
